-- curse_reduce_hp
-- created by xinj
-- 施放某技能，同时降低目标生命值

return {
    apply = function(prop, baseValue)
        local value = math.modf(baseValue * prop[3] / 1000);
        if prop[3] > 0 then
            value = math.max(1, value);
        end

        return value;
    end,

    clear = function(who, prop)
        -- 血量还原
        local value = who:getHp() + prop[3];
        who:setRealHp(value);
    end,

    record = function(target, prop, path)
        return false;
    end
};